FROM python:3.10.6

MAINTAINER jiayifei <916457600@qq.com>

# 设置工作目录
WORKDIR /app
COPY . /app

# 配置 allure
RUN apt-get update && apt-get install -y allure openjdk-8-jdk
ADD allure-2.24.1.tgz /usr/local
RUN ln -s /usr/local/allure-2.24.1/bin/allure /usr/bin/allure

# 安装项目依赖
RUN pip3 install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
RUN pip3 install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r requirements.txt

# 执行器运行
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]